% 各种符号、术语

\newcounter{char}
\setcounter{char}{1}
\loop\ifnum\value{char}<27
  \expandafter\edef\csname c\Alph{char}\endcsname{\noexpand\symcal{\Alph{char}}}  % mathcal
  \expandafter\edef\csname b\Alph{char}\endcsname{\noexpand\symbf{\Alph{char}}}  % mathcal
  \expandafter\edef\csname \Alph{char}\Alph{char}\endcsname{\noexpand\symbb{\Alph{char}}}   % mathbb
  \expandafter\edef\csname fr\Alph{char}\endcsname{\noexpand\mathfrak{\Alph{char}}} % mathfrak
  \expandafter\edef\csname fr\alph{char}\endcsname{\noexpand\mathfrak{\alph{char}}} % mathfrak
  \expandafter\edef\csname e\Alph{char}\endcsname{\noexpand\symsf{\Alph{char}}}   % mathsf
  \expandafter\edef\csname r\Alph{char}\endcsname{\noexpand\mathrm{\Alph{char}}}   % mathrm
  \expandafter\edef\csname s\Alph{char}\endcsname{\noexpand\symscr{\Alph{char}}}  % mathscr
  \addtocounter{char}{1}
\repeat

\newcommand{\diff}{\mathrm{d}}
\newcommand\Bs{\operatorname{Bs}}
\newcommand\proj{\operatorname{proj}}
\newcommand\Proj{\operatorname{Proj}}
\newcommand\PROJ{\operatorname{\symbf{Proj}}}
\newcommand\Inj{\operatorname{Inj}}
\newcommand\im{\operatorname{Im}}
\newcommand\Hom{\operatorname{Hom}}
\newcommand\Mod{\operatorname{Mod}}
\newcommand\coh{\operatorname{coh}}
\newcommand\Map{\operatorname{Map}}
\renewcommand\ker{\operatorname{Ker}}
\newcommand\Ker{\operatorname{Ker}}
\newcommand\coker{\operatorname{Coker}}
\newcommand\Coker{\operatorname{Coker}}
\newcommand\PGL{\operatorname{PGL}}
\newcommand\GL{\operatorname{GL}}
\newcommand\SL{\operatorname{SL}}
\renewcommand\mod{\operatorname{mod}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\adj}{\operatorname{adj}}
\newcommand{\sgn}{\operatorname{sgn}}
\newcommand{\Span}{\operatorname{Span}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\End}{\operatorname{End}}
\newcommand{\Tor}{\operatorname{Tor}}
\newcommand{\diag}{\operatorname{diag}}
\newcommand{\congm}{\operatorname{cong}}
\newcommand{\Null}{\operatorname{null}}
\newcommand{\spec}{\operatorname{Spec}}
\newcommand{\spm}{\operatorname{Spm}}
\newcommand{\Max}{\operatorname{Max}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\Ass}{\operatorname{Ass}}
\newcommand{\Ext}{\operatorname{Ext}}
\newcommand{\depth}{\operatorname{depth}}
\newcommand{\Supp}{\operatorname{Supp}}
\newcommand{\supp}{\operatorname{Supp}}
\newcommand{\grade}{\operatorname{grade}}
\newcommand{\Ann}{\operatorname{Ann}}
\newcommand{\ann}{\operatorname{Ann}}
\newcommand{\Aut}{\operatorname{Aut}}
\newcommand{\height}{\operatorname{ht}}
\newcommand{\perf}{\operatorname{perf}}
\newcommand{\norm}[1]{\lVert #1 \rVert}
\newcommand{\pair}[1]{\langle #1 \rangle}
\newcommand{\ev}{\operatorname{ev}}
\newcommand{\cof}{\operatorname{cof}}
\newcommand{\Res}{\operatorname{Res}}
\newcommand{\Syl}{\operatorname{Syl}}
\newcommand{\Sing}{\operatorname{Sing}}
\newcommand{\kronecker}[2]{\genfrac{(}{)}{}{}{#1}{#2}}
\newcommand{\Cong}{\operatorname{cong}}
\newcommand{\Spec}{\operatorname{Spec}}
\newcommand\Content{\operatorname{Content}}
\newcommand\rad{\operatorname{rad}}
\newcommand\Pic{\operatorname{Pic}}
\newcommand\Sh{\operatorname{Sh}}
\newcommand\gr{\operatorname{gr}}
\newcommand\PSh{\operatorname{PSh}}
\newcommand\codim{\operatorname{codim}}
\newcommand{\Div}{\operatorname{div}}
\newcommand{\Dom}{\operatorname{Dom}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\ind}{\operatorname{ind}}
\newcommand{\Num}{\operatorname{Num}}
\newcommand{\disc}{\operatorname{disc}}
\newcommand{\length}{\operatorname{length}}
\newcommand\ord{\operatorname{ord}}
\newcommand\Qcoh{\operatorname{Qcoh}}
\newcommand\Vect{\operatorname{Vect}}
\newcommand{\sHom}{\sH om}

\renewcommand{\leadsto}{\rightsquigarrow}
\newcommand\tinybullet{\vcenter{\hbox{\tiny$\bullet$}}}
\newcommand{\eqdef}{\overset{\textup{def}}{=}}
\renewcommand{\iff}{\,\textbf{\textup{iff}}\,}
\newcommand{\op}{\textup{op}}
\providecommand{\square}{\ensuremath{\mdlgwhtsquare}}

% 圆圈数字用于标记步骤之类
\providecommand\circled[1]{\raisebox{1pt}{\tikz[baseline=(char.base)]{\node[circle,draw,inner sep=1pt] (char) {\scriptsize #1};}}}
\providecommand\dashrightarrow{\rightdasharrow}

